'
\ufeff
A king has ordered all n women in his kingdom to stand in a row. Some women stand facing the right direction, and some stand facing the left direction, and their directions are depicted using a string k \ufeffThe king decides to choose one woman from the row to be the queen, and he needs your help in doing so \ufeffbased on the following criteria:
\ufeffAny woman can be chosen to be queen. Once the queen is chosen, all other women must change their direction and stand in the row
the queen.
\ufeffThe best quo
albe the one who will cause the least number of
women to change their dileonen.
@ srmist
Find out the position of the best queen and the number of women who will have to change their position to face the best queen.
Input Format
\ufeffThe first line contains an integer n \ufeffthe number of women in the row.
\ufeffThe second line contains a string k of length n \ufeffwhere R \ufeffdepicts right and L \ufeffdepicts left.
ay@srmist
#include vector
#include iostream \ufeff#include algorithm \ufeffusing namespace std;
int main
\ufeffEnter your code here return ;
Output Format
Output should display two spaceseprated positive integers:
\ufeffThe position of the best queen index starting from
\ufeffThe number of women who will have to change their position to face the best queen.
'